-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sealedoff #1
Sealedoff #1
Conversation
…, to seal them off.
- removed all global variables (GUIs and fonts). They must now be set once using a function. - removed export on ItemGiven and created an accessor instead. - Similarly, added an accessor on UsedAction
…r Save, one for Load and one for Options - I have removed global variables from the Options script : the fonts and the GUIs must now be set externally, in TemplateSettings - I have moved "Offset" and "Distance" to a utility class
@jeancallisti , something I noticed: #ifndef __OPTION_GUI_MODULE__ //a dependency is missing void game_start() { AbortGame("Missing module 'OptionGui'"); } #endif You could instead use #error command like #ifndef __OPTION_GUI_MODULE__ //a dependency is missing #error Missing module 'OptionGui' #endif This will report error at compile time. |
- added reminders to remove references to gMain - fixed some references to global variables that I overlooked in previous commits
…data independently frm their current state - made it possible to setup the buttons and their graphics outside of the module for better integration with larger code base
- Made function Verbs::GetButtonAction more robust (had issues dealing with action 0) - Made most enums start at value 0 instead of 1, to avoid a "dead" value at the beginning of iterations
This pull request has some issues. Also in your branch the functions dropdown in the AGS Editor doesn't work anymore, or it least it can't show any functions. |
This branch focuses on "sealing off" this module's script from the global script and from the game.
The goal is to make this module less dependant on any global data from the game.
Specifically :
Additionally to that, some (moderate) effort is put into gathering global variables from the modules' scripts into objects (structs), as members. This achieves two things : 1) This acts like a primitive namespace (you know instantly where the variables come from), 2) This certifies that there are no unexepected "export" of variables.